﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MotionCS.Enumerate;

namespace MotionCS.Module
{
    /// <summary>
    /// 模组接口
    /// </summary>
    public interface IModule
    {
        /// <summary>
        /// sequence
        /// </summary>
        int ModuleKey { get; }

        /// <summary>
        /// 是否启用
        /// </summary>
        bool IsEnable { get; }

        /// <summary>
        /// 是否输出记录日志
        /// </summary>
        bool IsLogOut { get; set; }

        /// <summary>
        /// 初始化模组
        /// </summary>
        /// <returns></returns>
        //int Init();

        /// <summary>
        /// 注销模组
        /// </summary>
        void Dispose();

        /// <summary>
        /// 复位模组
        /// </summary>
        /// <returns></returns>
        int Reset();

        /// <summary>
        /// 自动启动
        /// </summary>
        int AutoStart(object param = null);

        /// <summary>
        /// 自动暂停
        /// </summary>
        int AutoPause();

        /// <summary>
        /// 自动继续
        /// </summary>
        int AutoContinue();

        /// <summary>
        /// 自动停止
        /// </summary>
        int AutoStop();
        /// <summary>
        /// 任务状态
        /// </summary>
        /// <returns></returns>
        ModuleTaskStateE ModuleTaskState();
    }
}
